<div class="dux-index-count uk-margin-remove-top">
    <ul class="uk-grid uk-child-width-expand ">
        <li>
            <div class="item item1 uk-margin-right-sm">
                <div class="icon">
                    <i class="fa fa-money"></i>
                </div>
                <div class="info">
                    <div class="count">￥{$userInfo.money}</div>
                    <div class="name">账户余额</div>
                </div>
            </div>
        </li>
        <li>
            <div class="item item2 uk-margin-left-sm">
                <div class="icon">
                    <i class="fa fa-outdent"></i>
                </div>
                <div class="info">
                    <div class="count">{$userInfo.money_charge}</div>
                    <div class="name">总支出</div>
                </div>
            </div>
        </li>
        <li>
            <div class="item item3 uk-margin-left-sm">
                <div class="icon">
                    <i class="fa fa-indent"></i>
                </div>
                <div class="info">
                    <div class="count">{$userInfo.money_spend}</div>
                    <div class="name">总入账</div>
                </div>
            </div>
        </li>
    </ul>
</div>
<br>
<div class="uk-grid">
    <div class="uk-width-1-2">
        <div class="dux-box">
            <div class="box-header">
                今日消费
            </div>
            <div class="box-body">
                <p>支出: <span class="uk-text-danger">￥{price_format($dayInfo.spend)}</span></p>
                <p>收入: <span class="uk-text-danger">￥{price_format($dayInfo.charge)}</span></p>
                <div class="day-chart"></div>
            </div>
        </div>
    </div>
    <div class="uk-width-1-2">
        <div class="dux-box">
            <div class="box-header">
                本月消费
            </div>
            <div class="box-body">
                <p>支出: <span class="uk-text-danger">￥{price_format($monthInfo.spend)}</span></p>
                <p>收入: <span class="uk-text-danger">￥{price_format($monthInfo.charge)}</span></p>
                <div class="month-chart"></div>
            </div>
        </div>
    </div>
</div>


<br>
<div class="dux-box">
    <div class="box-header">
        年度消费
    </div>
    <div class="box-body">

        <canvas id="stats" height="400" style="height: 400px"></canvas>

    </div>
</div>

<?php $sumMoney = $userInfo['money_charge'] + $userInfo['money_spend']; $sumPoints = $userInfo['money_charge'] + $userInfo['money_spend']; ?>
<script>
    Do('base', 'chart', 'tpl', function () {

        function showData() {
            var canvas = $('#stats').get(0);
            var ctx = canvas.getContext("2d");
            new Chart(ctx, {
                type: 'line',
                data: {
                    labels: {json_encode($statsData.labels)},
                    datasets: {json_encode($statsData.datasets)}
                },
            options: {
                //response: true,
                maintainAspectRatio : false
            }
        });
        }
        showData();
    });

</script>